package com.syxbyi._2threadpool;

import java.io.File;
import java.util.concurrent.locks.ReentrantLock;

public class RemoveThread implements Runnable {

    private DirectoryTree fileTree;
    private ReentrantLock threadLock = new ReentrantLock();

    public RemoveThread(DirectoryTree fileTree) {
        this.fileTree = fileTree;
    }

    @Override
    public void run() {
        while(true) {
            if (!fileTree.removeFiles()) break;
        }
    }
}
